// Function to rotate a list of photos given their ids in the database
// Copyright 2006 (C) Ralph Thomas

#ifndef MISSION_APPS_PHOTO_ROTATE_H
#define MISSION_APPS_PHOTO_ROTATE_H

#include <util/cow_vector.h>

namespace apps {
	namespace photo {
		//
		/// This function rotates the photos in the list of IDs it's
		/// given by the number of degrees (a multiple of 90) specified.
		/// It takes an id list (rather than something more generic,
		/// like an adobe::array_t of filenames) to simplify the Eve
		/// definition. If Eve-markup ever gets replaced with Lua (an
		/// eventual goal) then this function will be changed to operate
		/// on a single file and all of the design complexity can live
		/// in Lua.
		///
		/// \param	ids		the IDs of the photos to rotate.
		/// \param	degrees	the number of degrees to rotate by (multiple of 90).
		//
		void rotate(util::cow_vector<int>::type ids, unsigned int degrees);
		//
		/// Rotate a single photo by the specified number (multiple of 90)
		/// of degrees.
		///
		/// \param	url		the URL to the photo.
		/// \param	degrees	the number of degrees to rotate by (multiple of 90).
		//
		void rotate_one(const std::string& url, unsigned int degrees);
	}
}

#endif

